
.wrapper{
    width: 450px;
    background-color: #fff;
    /* 内边距（上下左右） */
    padding: 40px;
    /* 盒子阴影 */
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    /* 圆角 */
    border-radius: 8px;
    margin-top: 20px;
    margin-left: 29%;

}
.wrapper .input-data{
    /* 相对定位 */
    position:relative;
    width: 100%;
    height: 40px;
}
.wrapper .input-data input{
    width: 100%;
    height: 100%;
    border:none;
    font-size: 17px;
    border-bottom: 2px solid #c0c0c0;
}
/* 输入框获得焦点时 */
.wrapper .input-data input:focus ~ label,
/* 输入框的值为合法时 */
.wrapper .input-data input:valid ~ label{
    /* label上移，同时改变字号、字体颜色 */
    transform: translateY(-25px);
    font-size: 15px;
    color: #2c6fdb;
}
.wrapper .input-data label{
    /* 绝对定位 */
    position: absolute;
    bottom: 10px;
    left: 0;
    color: #808080;
    /* 这个属性可以使点击label穿透到输入框 */
    pointer-events: none;
    /* 现在动画有点生硬，在这里需要给动画加个过渡 */
    transition: all 0.3s ease;
}
.wrapper .input-data .underline{
    position: absolute;
    bottom: 0;
    height: 2px;
    width: 100%;
    background-color: #2c6fdb;
    /* 沿X轴缩小 */
    transform: scaleX(0);
    /* 这里同样给动画加个过渡 */
    transition: all 0.3s ease;
}
.wrapper .input-data input:focus ~ .underline,
.wrapper .input-data input:valid ~ .underline{
    /* 沿X轴放大 */
    transform: scaleX(1);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
}
.header {
    width: 100%;
    background-color: cornflowerblue;
    color: white;
    padding: 10px 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
}
.header h1 {
    margin: 0;
}
.header .username {
    position: absolute;
    right: 20px;
    top: 20px;
}
.sidebar {
    width: 200px;
    background-color: #f4f4f4;
    padding-top: 60px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    text-align: center;
}
.sidebar a {
    display: block;
    color: black;
    padding: 20px 0;
    text-decoration: none;
    font-size: 18px;
}
.sidebar a:hover {
    background-color: #ddd;
}
.content {
    margin-left: 200px;
    padding: 60px 20px;
    width: 100%;
}
.profile {
    text-align: center;
    margin-top: 20px;
}
.profile img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
}
.profile h2 {
    color: cornflowerblue;
}
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}
.card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card p {
    margin: 0;
    color: #333;
}
.card a {
    color: gray;
    text-decoration: none;
    font-size: 14px;
}

h2 {
    color: cornflowerblue;
    text-align: center;
}
input:focus {
    outline: none;
    border-color: transparent;
}

.content {
    display: none;
}
.content.active {
    display: block;
}

.amounts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.amount {
    background-color: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
}
.amount:hover {
    background-color: #ddd;
}

.amount.active {
    background-color: #f0f0f0; /* 你可以根据需要调整颜色 */
    border: 2px solid #000; /* 你可以根据需要调整边框 */
}

.custom-amount {
    display: flex;
    align-items: center;
    gap: 10px;
}

#payment {
    color: grey;
}
.custom-amount input {
    width: 85px;
    height: 22px;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f4f4f4;
    cursor: pointer;
}
.custom-amount input:hover {
    background-color: #ddd;
}
.recharge-button {
    padding: 10px 20px;
    background-color: cornflowerblue;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-size: 20px;
    margin-top: 20px;
}
.recharge-button:hover {
    background-color: #2c6fdb;
}

.address-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.address-actions button {
    padding: 5px 10px;
    background-color: cornflowerblue;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.address-actions button:hover {
    background-color: #2c6fdb;
}
.add-address-button, .submit-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: cornflowerblue;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.add-address-button:hover {
    background-color: #2c6fdb;
}

.order-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.order-info img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
}
.order-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.order-title {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
.paid {
    color: green;
    background-color: #e0ffe0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid green;
}
.unpaid {
    color: red;
    background-color: #ffe0e0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid red;
}

.refund {
    color: orangered;
    background-color: #ffddcc;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid orangered;
}

.refunded {
    color: gray;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid gray;
}

.canceled {
    color: gray;
    background-color: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid gray;
}

.order-quantity {
    color: gray;
    font-size: 14px;
}
.order-amount {
    color: red;
    font-size: 18px;
}
.order-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}
.order-actions button {
    padding: 5px 10px;
    background-color: cornflowerblue;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.order-actions button:hover {
    background-color: #2c6fdb;
}

.submit-button:hover {
    background-color: #2c6fdb;
}

.order-time {
    color: gray;
    font-size: 14px;
    margin-right: 10px;
    margin-top: 5px;
}

.none {
    display: none;
}
.show {
    display: block;
}
.goto {
    color: grey;
    font-size: 10px;
    margin-left: 5px;
}

/* 弹窗背景 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed; /* 固定位置 */
    z-index: 1; /* 置于顶层 */
    left: 0;
    top: 0;
    width: 100%; /* 全屏宽度 */
    height: 100%; /* 全屏高度 */
    overflow: auto; /* 允许滚动 */
    background-color: rgb(0,0,0); /* 背景颜色 */
    background-color: rgba(0,0,0,0.4); /* 背景颜色透明度 */
}

/* 弹窗内容 */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 居中 */
    padding: 20px;
    border: 1px solid #888;
    width: 100%; /* 宽度 */
    max-width: 500px; /* 最大宽度 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* 阴影效果 */
    border-radius: 10px; /* 圆角 */
}

/* 关闭按钮 */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 输入框样式 */
input[type="tel"], input[type="email"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 保存按钮样式 */
#userInfoModal button {
    background-color: cornflowerblue; /* 绿色背景 */
    color: white; /* 白色文字 */
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px 0 10px 43%;
}

#userInfoModal button:hover {
    background-color: dodgerblue; /* 悬停效果 */
}
